<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Merchant_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-merchant_id" data-rule="required" data-primary-key="id" data-field="company_name" data-pagination="true" data-source="merchant/index" class="form-control selectpage" name="row[merchant_id]" type="text" value="{$row.merchant_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('S_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-s_id" data-rule="required" data-source="merchant/store/index" data-pagination="true" data-primary-key="id" data-field="store_name" class="form-control selectpage" name="row[s_id]" type="text" value="{$row.s_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Referee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-referee" data-rule="required" data-source="user/user/index" data-multiple="true" data-search-field="u.mobile,ua.real_name" data-pagination="true" data-primary-key="id" data-field="ushowfiled" class="form-control selectpage" name="row[referee]" type="text" value="{$row.referee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">权限:</label>
        <div class="col-xs-12 col-sm-8" id="checkbox_power">
            {if $purviewCurrent}
            {foreach $purviewCurrent as $key=>$vo}
                <div id="checkbox_{$key}" style="width: 100%;display: flex">
                    <div style="width: 30%;">
                        <span style="width: 100%;">{$vo.username}:</span>
                    </div>
                    <div style="width: 70%;">
                        {foreach $purview as $pk=>$pv}
                            <input type="checkbox" name="row[purview][{$key}][]" {if in_array($pv['value'],$vo['purview'])} checked="checked" {/if} value="{$pv.value}">{$pv.title}</input>
                        {/foreach}
                    </div>
                </div>
            {/foreach}
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">戳它 --></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-primary" data-toggle="addresspicker" data-input-id="c-address" data-lng-id="c-lng" data-lat-id="c-lat">点击选择地址获取经纬度</button>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lng" data-rule="required" class="form-control" step="0.00000001" name="row[lng]" type="number" value="{$row.lng|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lat" data-rule="required" class="form-control" step="0.00000001" name="row[lat]" type="number" value="{$row.lat|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sign_start_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-date-use-current="true" name="row[sign_start_date]" type="text" value="{$row.sign_start_date|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sign_end_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-date-use-current="true" name="row[sign_end_date]" type="text" value="{$row.sign_end_date|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Match_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-match_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-date-use-current="true" name="row[match_date]" type="text" value="{$row.match_date|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('People_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-people_count" data-rule="required" class="form-control" name="row[people_count]" type="number" value="{$row.people_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Avg_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-avg_amount" data-rule="required" class="form-control" step="0.01" name="row[avg_amount]" type="number" value="{$row.avg_amount|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Condition')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-condition" class="form-control editor" rows="5" name="row[condition]" cols="50">{$row.description|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" class="form-control editor" rows="5" name="row[description]" cols="50">{$row.description|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rounds')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rounds" data-rule="required" class="form-control" name="row[rounds]" type="number" value="{$row.rounds|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group_people_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_people_number" data-rule="required" class="form-control" name="row[group_people_number]" type="number" value="{$row.group_people_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">组内小组人数:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_inner_numbers" data-rule="required" class="form-control" name="row[group_inner_numbers]" type="number" value="{$row.group_inner_numbers|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">轮播图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-banner_image" data-rule="required" class="form-control" size="50" name="row[banner_image]" type="text" value="{$row.banner_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-banner_image" class="btn btn-danger faupload" data-input-id="c-banner_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-banner_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-banner_image" class="btn btn-primary fachoose" data-input-id="c-banner_image" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-banner_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-banner_image"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Release_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-release_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-date-use-current="true" name="row[release_time]" type="text" value="{$row.release_time|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
